package core;

import voting.Measure;

/**
 * Interface for framework components that maintain a local Game state.
 */
public interface GameParticipant 
{
	/**
	 * Notifies a GameParticipant that a new Measure is being voted upon.
	 */
	public void notifyOfMeasure(Measure m);
	
	/**
	 * Notifies a GameParticipant that the given Player has cast the given vote.
	 */
	public void notifyOfVote(Player player, int vote);
	
	/**
	 * Directs the GameParticipant to declare a win for the given player, if
	 * the winner is specified; otherwise, directs the GameParticipant to declare
	 * a draw
	 */
	public void endGame(String winner);

	/**
	 * @return the module this <code>GameParticipant</code> is playing
	 */
	public String getModule();

	/**
	 * @return the <code>Player</code> corresponding to this <code>GameParticipant</code> (<code>null</code> if none).
	 */
	public Player getPlayer();
}
